﻿<%@ Page Language="C#" %>

<%@ Import Namespace="wojilu" %>
<%@ Import Namespace="wojilu.View" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Domain" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Service" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>#{softtitle}</title>
<link href="#{path.css}ybb/css/baselist.css?v=#{cssVersion}" rel="stylesheet" type="text/css" />
<link href="#{path.css}ybb/css/all.css?v=#{cssVersion}" rel="stylesheet" type="text/css" />
<link href="#{path.css}ybb/css/formdiv.css?v=#{cssVersion}" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="#{path.js}ybb/js/jquery.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/form.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/control.js?v=#{jsVersion}"></script>
<script type="text/javascript">

	var resizewindow= null;

	window.onresize = function(){
		var h = $(window).height();
		if(resizewindow!=h){
			sizewindow();
			resizewindow=h;
		}
	}

	function sizewindow(){
		var h = $(window).height();
		if(document.getElementById("mainbodybottonauto")){
			$('.managebottonadd').css({height:h-40});
		}
	}
	var modelmanage_js_modelname_empty = "_{modelmanage_js_modelname_empty}";
	var modelmanage_js_pagemax_empty = "_{modelmanage_js_pagemax_empty}";
	var modelmanage_js_edit_ok = "_{modelmanage_js_edit_ok}";
	var modelmanage_js_edit_no = "_{modelmanage_js_edit_no}";
	var iframename = "#{iframename}";
	$(document).ready(function(){
	    var h = '#{iframeheightwindow}';
		$('.managebottonadd').css({height:h-40});
		var options = {
			beforeSubmit: formverify,
			success:saveResponse
		}
		$('#modeledit').submit(function() {
			$(this).ajaxSubmit(options);
			return false;
		});
	})




	function formverify(formData) {
		var queryString = $.param(formData);
		var get=urlarray(queryString);
		if(get['modelname']==""){
			document.modeledit.modelname.focus();
			alert(modelmanage_js_modelname_empty);
			return false;
		}
		if(get['pagemax'].match(/^[1-9][0-9.]*$/ig)==null) {
			document.modeledit.pagemax.focus();
			alert(modelmanage_js_pagemax_empty);
			return false;
		}
		parent.windowsdig('Loading', 'iframe:#{load}', '400px', '180px', 'iframe', false);
	}
	function saveResponse(options){
		parent.closeifram();
		if (options=='true'){
			parent.frames[iframename].refresh('selectform','selectall','check_all');
			alert(modelmanage_js_edit_ok);
		}else{
			alert(modelmanage_js_edit_no);
		}
		parent.onaletdoc()
	}
</script>
</head>

<body>
<%Model modelread = v.data("modelread") as Model; %>
<form name="modeledit" id="modeledit" method="post" action="#{ActionLink}">
<input type="hidden" name="inputclass" value="edit" />
<div id="mainbodybottonauto" class="managebottonadd">
	<div class="maindobycontent">
		<!--查看已选择的类型-->
		<div class="suggestion">
			<span class="sugicon"><span class="strong colorgorning2">_{position_title}</span><span class="colorgorningage">_{modelmanage_edit_mess}<u>#{modelread.modelname}</u></span></span>
		</div>
		<div class="manageeditdiv">
			<div class="maneditcontent">
				<table class="formtable">
					<tr class="trstyle2">
						<td width="15%" class="trtitle011">_{modelmanage_add_modelname}</td>
						<td width="85%" class="trtitle02"><input type="text" name="modelname" size="25" maxlength="20" value="#{modelread.modelname}" class="infoInput"/> <span class="cautiontitle">_{modelmanage_add_modelname_mess}</span></td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{modelmanage_add_pagemax}</td>
						<td width="85%" class="trtitle02"><input type="text" name="pagemax" size="5" value="#{modelread.pagemax}" maxlength="2" class="infoInput"/> <span class="cautiontitle">_{modelmanage_add_pagemax_mess}</span></td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{modelmanage_add_pagesylte}</td>
						<td width="85%" class="trtitle02">
						<select size="1" name="pagesylte">
							<option <%if(modelread.pagesylte ==1){ %> selected<%} %> value="1">_{modelmanage_add_pagesylte1}</option>
							<option <%if(modelread.pagesylte ==2){ %> selected<%} %> value="2">_{modelmanage_add_pagesylte2}</option>
						</select>
						</td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle03" colspan="2">_{article_doc_tab_title03}</td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{modelmanage_add_isbase}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="isbase"<%if(modelread.isbase==1){ %> checked="checked"<%} %> /> _{open_botton_title}&nbsp;
							<input type="radio" value="0" name="isbase"<%if(modelread.isbase==0){ %> checked="checked"<%} %>/> _{close_botton_title}
							<span class="cautiontitle">_{modelmanage_add_isbase_mess}</span>
						</td>
					</tr>

					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{modelmanage_add_istsn}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="istsn"<%if(modelread.istsn==1){ %> checked="checked"<%} %> onclick="showdiv(1,'#tsnstyle','0|1','trstyle2 displaynone|trstyle2 displaytrue',1,1)"/> _{open_botton_title}&nbsp;
							<input type="radio" value="0" name="istsn"<%if(modelread.istsn==0){ %> checked="checked"<%} %> onclick="showdiv(0,'#tsnstyle','0|1','trstyle2 displaynone|trstyle2 displaytrue',1,1)"/> _{close_botton_title}
							<span class="cautiontitle">_{modelmanage_add_istsn_mess}</span>
						</td>
					</tr>

					<tr class="trstyle2 <%if(modelread.istsn==0){ %> displaynone<%} %>"  id="tsnstyle">
						<td class="trtitle01">_{modelmanage_add_tsnstyle}</td>
						<td class="trtitle02">
							<input type="text" name="tsnstyle" size="30" maxlength="30" value="<%if(modelread.tsnstyle ==""){ %>SN{datetime}{s}<%}else{ %><%=modelread.tsnstyle %><%} %>" class="infoInput"/>
							<span class="cautiontitle">_{modelmanage_add_tsnstyle_mess}</span>
						</td>
					</tr>

					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{modelmanage_add_isalbum}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="isalbum"<%if(modelread.isalbum==1){ %> checked="checked"<%} %>/> _{open_botton_title}&nbsp;
							<input type="radio" value="0" name="isalbum"<%if(modelread.isalbum==0){ %> checked="checked"<%} %>/> _{close_botton_title}
							<span class="cautiontitle">_{modelmanage_add_isalbum_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{modelmanage_add_isextid}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="isextid"<%if(modelread.isextid==1){ %> checked="checked"<%} %>/> _{open_botton_title}&nbsp;
							<input type="radio" value="0" name="isextid"<%if(modelread.isextid==0){ %> checked="checked"<%} %>/> _{close_botton_title}
							<span class="cautiontitle">_{modelmanage_add_isextid_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{modelmanage_add_issid}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="issid"<%if(modelread.issid==1){ %> checked="checked"<%} %>/> _{open_botton_title}&nbsp;
							<input type="radio" value="0" name="issid"<%if(modelread.issid==0){ %> checked="checked"<%} %>/> _{close_botton_title}
							<span class="cautiontitle">_{modelmanage_add_issid_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{modelmanage_add_isfgid}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="isfgid"<%if(modelread.isfgid==1){ %> checked="checked"<%} %>/> _{open_botton_title}&nbsp;
							<input type="radio" value="0" name="isfgid"<%if(modelread.isfgid==0){ %> checked="checked"<%} %>/> _{close_botton_title}
							<span class="cautiontitle">_{modelmanage_add_isfgid_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{modelmanage_add_islinkdid}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="islinkdid"<%if(modelread.islinkdid==1){ %> checked="checked"<%} %>/> _{open_botton_title}&nbsp;
							<input type="radio" value="0" name="islinkdid"<%if(modelread.islinkdid==0){ %> checked="checked"<%} %>/> _{close_botton_title}
							<span class="cautiontitle">_{modelmanage_add_islinkdid_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{modelmanage_add_isorder}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="isorder"<%if(modelread.isorder==1){ %> checked="checked"<%} %> onclick="ondisplayother('opiddiv','trstyle2 displaytrue','opiddiv2','trstyle2 displaynone');"/> _{open_botton_title}&nbsp;
							<input type="radio" value="0" name="isorder"<%if(modelread.isorder==0){ %> checked="checked"<%} %> onclick="ondisplayother('opiddiv','trstyle2 displaynone','opiddiv2','trstyle2 displaytrue')"/> _{close_botton_title}
							<span class="cautiontitle">_{modelmanage_add_isorder_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2 <%if(modelread.isorder==0){ %>displaynone<%} %>" id="opiddiv">
						<td class="trtitle01">_{modelmanage_add_opid}</td>
						<td class="trtitle02">
							<select name="opid" id="opid">
								<option <%if(modelread.opid==0){ %> selected="selected"<%} %> value="0">_{modelmanage_add_opid_select}</option>
                                <%var list = v.data("list") as List<Order_Pay>; %>
                                <%foreach(var row in list){ %>
								<option <%if(modelread.opid==row.Id){ %>selected="selected" <%} %>value="<%=row.Id %>"><%=row.payname %> _{ordermain_add_paytype_price} <%=row.payis %>%</option>
								<%} %>
							</select>
						</td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{modelmanage_add_ismessage}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="ismessage"<%if(modelread.ismessage==1){ %> checked="checked"<%} %>/> _{open_botton_title}&nbsp;
							<input type="radio" value="0" name="ismessage"<%if(modelread.ismessage==0){ %> checked="checked"<%} %>/> _{close_botton_title}
							<span class="cautiontitle">_{modelmanage_add_ismessage_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2">
						<td width="15%" class="trtitle01">_{modelmanage_add_ispurview}</td>
						<td width="85%" class="trtitle02">
							<input type="radio" value="1" name="ispurview"<%if(modelread.ispurview==1){ %> checked="checked"<%} %>/> _{open_botton_title}&nbsp;
							<input type="radio" value="0" name="ispurview"<%if(modelread.ispurview==0){ %> checked="checked"<%} %>/> _{close_botton_title}
							<span class="cautiontitle">_{modelmanage_add_ispurview_mess}</span>
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
</div>
<div id="downbotton">
	<div id="subbotton">
		<table border="0" width="100%">
			<tr>
				<td id="right"><input type="submit" name="Submit" value="_{botton_edit}" class="buttonface" /></td>
				<td id="left" class="padding-left5"><input type="button" name="cancel" onClick="javascript:parent.onaletdoc();" value="_{botton_edit_reset}" class="buttonface" /></td>
			</tr>
		</table>
	</div>
</div>
</form>
</body>

</html>


